package com.liangdemo.web.thread;

/**
 * @ClassName LiangErLe
 * @date 2022/6/9 15:29
 */
public class ThreadDemo3 {
    public static void main(String[] args) throws Exception {
        Thread t1 = new Test("线程1", 3, true);
        Thread t2 = new Test("线程2", 4, true);
        Thread t3 = new Test("线程3", 4, false);
        t1.start();
        t2.start();
        t3.start();
        System.in.read();
    }
}

class Test extends Thread {
    private String name;
    private int timeInSeconds;//时间
    private boolean success;

    public Test(String name, int timeInSeconds, boolean success) {
        this.name = name;
        this.timeInSeconds = timeInSeconds;
        this.success = success;
    }
}
